
<td>
  <div class="form-horizontal {{#error}}has-error{{/error}}">
    <div class="form-group">

    <label class="control-label col-sm-3 col-md-3 col-lg-2">{{verbose}}</label>

  {{#control}}
  {{! data-type-name="type.name" data-allow-null="allowNull" data-default-value="defaultValue"}}

  <div class="{{#text}}col-sm-5 col-md-4 col-lg-3{{/text}}{{#number}}col-sm-5 col-md-4 col-lg-3{{/number}}{{#date}}col-sm-5 col-md-4 col-lg-3{{/date}}{{#time}}col-sm-5 col-md-4 col-lg-3{{/time}}{{#datetime}}col-sm-5 col-md-4 col-lg-3{{/datetime}}{{#year}}col-sm-5 col-md-4 col-lg-3{{/year}}{{#select}}col-sm-5 col-md-4 col-lg-3{{/select}}{{#file}}col-sm-5 col-md-4 col-lg-3{{/file}}{{#radio}}col-sm-5 col-md-4 col-lg-3{{/radio}}{{#textarea}}{{#editor}}col-sm-9 col-md-9 col-lg-10{{/editor}}{{/textarea}}{{#textarea}}{{^editor}}col-sm-7 col-md-6 col-lg-5{{/editor}}{{/textarea}}">

  {{#number}}
  <input type="number" name="{{key}}" value="{{value}}" step="any" class="form-control" />
  {{/number}}

  {{#text}}
  <input type="text" name="{{key}}" value="{{value}}" class="form-control" />
  {{/text}}

  {{#textarea}}
  <textarea name="{{key}}" class="form-control {{#editor}}{{editor}}{{/editor}}">{{value}}</textarea>
  {{/textarea}}

  {{#select}}
  <select name="{{key}}" class="chosen-select form-control" data-placeholder="{{string.select}}" {{#multiple}}multiple="multiple"{{/multiple}}>
    <option value="" {{#selected}}selected="selected"{{/selected}}></option>
    {{!oneToMany}}
    {{#value}}
    <option value="{{__pk}}" {{#selected}}selected="selected"{{/selected}}>{{__text}}</option>
    {{/value}}
  </select>
  {{/select}}

  {{#date}}
  <input type="text" name="{{key}}" value="{{value}}" class="datepicker form-control" autocomplete="off" />
  {{/date}}
  {{#time}}
  <input type="text" name="{{key}}" value="{{value}}" class="timepicker form-control" autocomplete="off" />
  {{/time}}
  {{#datetime}}
  <input type="text" name="{{key}}" value="{{value}}" class="datetime-picker form-control" autocomplete="off" />
  {{/datetime}}
  {{#year}}
  <input type="text" name="{{key}}" value="{{value}}" class="yearpicker form-control" autocomplete="off" />
  {{/year}}

  {{#file}}
  {{^binary}}
  <input type="text" name="{{key}}" value="{{value}}" class="form-control" />
  {{/binary}}
  {{/file}}
  {{#binary}}
  <img src="{{value}}" alt="" />
  {{/binary}}

  {{#radio}}
  {{#value}}
  <label class="radio-inline">
    <input type="radio" name="{{key}}" value="{{value}}" {{#active}}checked="checked"{{/active}} /> {{text}}
  </label>
  {{/value}}
  {{/radio}}

  {{#error}}
  <strong class="help-block" data-error="{{type}}">{{message}}</strong>
  {{/error}}

  {{#hidden}}
  <input type="hidden" name="{{key}}" value="{{value}}" />
  {{/hidden}}

  </div>
  {{#date}}
  <div class="col-sm-4 col-md-4 col-lg-4">
    <a href="#" class="btn-today">{{string.today}}</a>
  </div>
  {{/date}}
  {{#file}}
  <div class="col-sm-4 col-md-4 col-lg-4">
    <input type="file" name="{{key}}" value="{{value}}" />
  </div>
  {{/file}}

  {{/control}}
    </div>
  </div>
</td>
